package com.xvyy.tingshu.common.config.threadpool;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.TimeUnit;

/**
 * ClassName: ThreadPoolProperties
 * Package: com.xvyy.tingshu.common.config.threadpool
 *
 * @Description:
 * @Author: xvyy
 * @Create: 2025/1/25 - 10:56
 * @Version: v1.0
 */
@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadPoolProperties {

    private int corePoolSize = Runtime.getRuntime().availableProcessors() * 2;

    private int maxPoolSize = 2 * corePoolSize;

    private int blockQueueSize = 1000;

    private long ttl = 30;

    private TimeUnit unit = TimeUnit.SECONDS;
}
